﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Topro.Application.Interface
{
    using Topro.Entity;
    using Topro.Entity.Query;
    using Topro.Entity.Request.Config;
    using Topro.Entity.Response.Config;

    /// <summary>
    /// 配置接口
    /// </summary>
    public interface ConfigService
    {
        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        public ConfigResponse Get(int id);

        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="type">类型</param>
        /// <returns></returns>
        public List<ConfigResponse> GetTypeList(int type);

        /// <summary>
        /// 保存、修改
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public JResult SaveConfig(ConfigRequest request);

        /// <summary>
        /// 保存、修改材料限制
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public JResult SaveMaterialLimit(ConfigRequest request);

        /// <summary>
        /// 更新状态
        /// </summary>
        /// <returns></returns>
        public JResult Updatestatus(int id, int status);

        /// <summary>
        /// 获取所有
        /// </summary>
        /// <returns></returns>
        public List<ConfigResponse> GetList();

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public PagedList<ConfigQueryResponse> GetPager(ConfigQuery query);
    }
}
